import time
import tkinter as tk
from tkinter import filedialog


def select_excel_files():
    root = tk.Tk()
    root.withdraw()  # 隐藏主窗口

    # 打开文件选择对话框，允许选择多个 Excel 文件
    file_paths = filedialog.askopenfilenames(
        title="选择 Excel 文件",
        filetypes=[("Excel 文件", "*.xlsx;*.xls")]
    )

    return file_paths


if __name__ == "__main__":
    selected_files = select_excel_files()
    if selected_files:
        print(",".join(selected_files))
    #time.sleep(10000)